home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / mig / dist / global.c < prev    next >
Encoding:
C/C++ Source or Header  |  1991-08-29  |  4.3 KB  |  152 lines

  1. /* 
  2.  * Mach Operating System
  3.  * Copyright (c) 1991,1990 Carnegie Mellon University
  4.  * All Rights Reserved.
  5.  * 
  6.  * Permission to use, copy, modify and distribute this software and its
  7.  * documentation is hereby granted, provided that both the copyright
  8.  * notice and this permission notice appear in all copies of the
  9.  * software, derivative works or modified versions, and any portions
  10.  * thereof, and that both notices appear in supporting documentation.
  11.  * 
  12.  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS 
  13.  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
  14.  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
  15.  * 
  16.  * Carnegie Mellon requests users of this software to return to
  17.  * 
  18.  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
  19.  *  School of Computer Science
  20.  *  Carnegie Mellon University
  21.  *  Pittsburgh PA 15213-3890
  22.  * 
  23.  * any improvements or extensions that they make and grant Carnegie the
  24.  * rights to redistribute these changes.
  25.  */
  26. /*
  27.  * HISTORY
  28.  * $Log:    global.c,v $
  29.  * Revision 2.7  91/08/28  11:16:53  jsb
  30.  *     Replaced ServerProcName with ServerDemux.
  31.  *     [91/08/13            rpd]
  32.  * 
  33.  *     Removed Camelot and TrapRoutine support.
  34.  *     Changed MsgKind to MsgSeqno.
  35.  *     [91/08/12            rpd]
  36.  * 
  37.  * Revision 2.6  91/06/26  14:39:24  rpd
  38.  *     Removed InitRoutineName.
  39.  *     [91/06/26            rpd]
  40.  * 
  41.  * Revision 2.5  91/06/25  10:30:59  rpd
  42.  *     Added ServerHeaderFileName.
  43.  *     [91/05/22            rpd]
  44.  * 
  45.  * Revision 2.4  91/02/05  17:54:23  mrt
  46.  *     Changed to new Mach copyright
  47.  *     [91/02/01  17:54:07  mrt]
  48.  * 
  49.  * Revision 2.3  90/06/19  23:00:47  rpd
  50.  *     Added UserFilePrefix.
  51.  *     [90/06/03            rpd]
  52.  * 
  53.  * Revision 2.2  90/06/02  15:04:38  rpd
  54.  *     Created for new IPC.
  55.  *     [90/03/26  21:10:43  rpd]
  56.  * 
  57.  * 07-Apr-89  Richard Draves (rpd) at Carnegie-Mellon University
  58.  *    Extensive revamping.  Added polymorphic arguments.
  59.  *    Allow multiple variable-sized inline arguments in messages.
  60.  *
  61.  *  8-Feb-89  David Golub (dbg) at Carnegie-Mellon University
  62.  *    Use default values for output file names only if they have not
  63.  *    yet been set.
  64.  *
  65.  * 17-Sep-87  Bennet Yee (bsy) at Carnegie-Mellon University
  66.  *    Added GenSymTab
  67.  *
  68.  * 25-Aug-87  Mary Thompson (mrt) at Carnegie-Mellon University
  69.  *    Changed CamelotPrefix to op_
  70.  *
  71.  * 12-Aug-87  Mary Thompson (mrt) at Carnegie-Mellon University
  72.  *    Initialized CamelotPrefix
  73.  *
  74.  * 10-Aug-87  Mary Thompson (mrt) at Carnegie-Mellon University
  75.  *    Changed UseRPC to TRUE
  76.  *
  77.  *  3-Aug-87  Mary Thompson (mrt) at Carnegie-Mellon University
  78.  *    Removed reference to UseThreads.
  79.  *
  80.  * 16-Jul-87  Robert Sansom (rds) at Carnegie Mellon University
  81.  *    Added MsgType.
  82.  *
  83.  * 28-May-87  Richard Draves (rpd) at Carnegie-Mellon University
  84.  *    Created.
  85.  */
  86.  
  87. #include "string.h"
  88. #include "global.h"
  89.  
  90. boolean_t BeQuiet = FALSE;
  91. boolean_t BeVerbose = FALSE;
  92. boolean_t UseMsgRPC = TRUE;
  93. boolean_t GenSymTab = FALSE;
  94.  
  95. boolean_t IsKernelUser = FALSE;
  96. boolean_t IsKernelServer = FALSE;
  97.  
  98. string_t RCSId = strNULL;
  99.  
  100. string_t SubsystemName = strNULL;
  101. u_int SubsystemBase = 0;
  102.  
  103. string_t MsgOption = strNULL;
  104. string_t WaitTime = strNULL;
  105. string_t ErrorProc = "MsgError";
  106. string_t ServerPrefix = "";
  107. string_t UserPrefix = "";
  108. string_t ServerDemux = strNULL;
  109.  
  110. string_t yyinname;
  111.  
  112. char NewCDecl[] = "(defined(__STDC__) || defined(c_plusplus))";
  113. char LintLib[] = "defined(LINTLIBRARY)";
  114.  
  115. void
  116. init_global()
  117. {
  118.     yyinname = strmake("<no name yet>");
  119. }
  120.  
  121. string_t UserFilePrefix = strNULL;
  122. string_t UserHeaderFileName = strNULL;
  123. string_t ServerHeaderFileName = strNULL;
  124. string_t InternalHeaderFileName = strNULL;
  125. string_t UserFileName = strNULL;
  126. string_t ServerFileName = strNULL;
  127.  
  128. void
  129. more_global()
  130. {
  131.     if (SubsystemName == strNULL)
  132.     fatal("no SubSystem declaration");
  133.  
  134.     if (UserHeaderFileName == strNULL)
  135.     UserHeaderFileName = strconcat(SubsystemName, ".h");
  136.     else if (streql(UserHeaderFileName, "/dev/null"))
  137.     UserHeaderFileName = strNULL;
  138.  
  139.     if (UserFileName == strNULL)
  140.     UserFileName = strconcat(SubsystemName, "User.c");
  141.     else if (streql(UserFileName, "/dev/null"))
  142.     UserFileName = strNULL;
  143.  
  144.     if (ServerFileName == strNULL)
  145.     ServerFileName = strconcat(SubsystemName, "Server.c");
  146.     else if (streql(ServerFileName, "/dev/null"))
  147.     ServerFileName = strNULL;
  148.  
  149.     if (ServerDemux == strNULL)
  150.     ServerDemux = strconcat(SubsystemName, "_server");
  151. }
  152.